package team.pwy.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import team.pwy.mapper.TicketMapper;
import team.pwy.pojo.entity.TicketOrder;

@Service
@Transactional
public class TicketServiceImpl implements TicketService{

    @Autowired
    private TicketMapper ticketMapper;

    @Override
    public Integer addTicOrd(Integer userId, String orderNumber, String orderPrice,String outRequestNo) {
        return ticketMapper.addTicOrd(userId,orderNumber,orderPrice,outRequestNo);
    }

    @Override
    public Integer updateByOrdNum(String orderNumber, String tradeNo) {
        return ticketMapper.updateByOrdNum(orderNumber,tradeNo);
    }

    @Override
    public TicketOrder findByOrderNum(String orderNum) {
        return ticketMapper.findByOrderNum(orderNum);
    }

    @Override
    public Integer updateByON(String orderNumber) {
        return ticketMapper.updateByON(orderNumber);
    }

}
